from redis import StrictRedis


class Config():
    DEBUG = None

    SECRET_KEY = 'TP44ysOwSrqrwZaHlL7LrdvohmJTvfwgyC9R+4tikzeMWLbfKv4vI/ss5u3CS5uaj0w='
    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@localhost/temp_info'
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    SESSION_TYPE = 'redis'
    SESSION_REDIS = StrictRedis(host='127.0.0.1', port='6379')
    SESSION_USE_SIGNER = True
    PERMANET_SESSION_LIFETIME = 86400


class DevelopmentConfig(Config):
    DEBUG = True


class ProductionConfig(Config):
    DEBUG = False


config_dict = {
    'development': DevelopmentConfig,
    'production': ProductionConfig
}
